﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace mozhi.smarterp.AuthorCenter.Migrations
{
    public partial class _202411261430 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "TargetUserId",
                table: "AbpUserTenant",
                type: "char(36)",
                nullable: false,
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
                collation: "ascii_general_ci");

            migrationBuilder.CreateIndex(
                name: "IX_AbpUserTenant_UserId_TenantId_TargetUserId",
                table: "AbpUserTenant",
                columns: new[] { "UserId", "TenantId", "TargetUserId" },
                unique: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_AbpUserTenant_UserId_TenantId_TargetUserId",
                table: "AbpUserTenant");

            migrationBuilder.DropColumn(
                name: "TargetUserId",
                table: "AbpUserTenant");
        }
    }
}
